how to solve solution of triangle